package com.excellent.mapper;

import com.excellent.entity.ImageRecognition;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ImageMapper {
    //保存识别结果
    @Insert("INSERT INTO image_recognition (image_path, recognition_model, recognition_result, recognition_duration) " +
            "VALUES (#{imagePath}, #{recognitionModel}, #{recognitionResult}, #{recognitionDuration})")
    void saveImageRecognization(ImageRecognition imageRecognition);

    //查询识别结果
    @Select("SELECT * FROM image_recognition")
    List<ImageRecognition> findAll();
}
